package com.project.bean;

import java.util.List;

public class CutPageBean<T> {
    /**展示信息集合*/
    private List<T> list;
    /**记录总条数*/
    private int count;
    /**总页数*/
    private int sumPage;
    /**每页显示的条数*/
    public static final int PAGESIZE = 3;

    public List<T> getList() {
        return list;
    }

    public void setList(List<T> list) {
        this.list = list;
    }

    public int getCount() {
        return count;
    }

    public void setCount(int count) {
        this.count = count;

       if (count % PAGESIZE == 0){
           this.sumPage = count/PAGESIZE;
       }else {
           this.sumPage = count/PAGESIZE + 1;
       }
    }

    public int getSumPage() {
        return sumPage;
    }

    public void setSumPage(int sumPage) {
        this.sumPage = sumPage;
    }

    @Override
    public String toString() {
        return "CutPageBean{" +
                "list=" + list +
                ", count=" + count +
                ", sumPage=" + sumPage +
                "}\n";
    }
}
